<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ include file="/views/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>【众筹平台排名】最新影视众筹，股权众筹，店铺众筹平台排名_影视众筹，股权众筹，店铺众筹平台成交排名_影视众筹，股权众筹，店铺众筹平台分红排名-众秀众筹</title>
	<meta name="Keywords" content="影视众筹平台排名，股权众筹平台排名，众筹排名，店铺众筹排名，影视众筹排名，股权众筹排名，店铺众筹排名，影视众筹分红，股权众筹退出，店铺众筹分红，店铺众筹退出" />
	<meta name="Description" content="众秀众筹众筹数据栏目提供影视众筹平台，股权众筹平台，店铺众筹平台分红，退出的排名、最新众筹平台成交排名,影视众筹，股权众筹，店铺众筹项目成交数据。了解更多众筹数据排名就到众秀众筹众筹平台排名众筹数据栏目析。" />
	<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
	<meta name="renderer" content="webkit"/>
	<link rel="stylesheet" href="<%=path%>/css/bootstrap/3.3.5/css/bootstrap.min.css" />
	<link rel="stylesheet" href="<%=path%>/css/cropper.min.css" />
	<link rel="stylesheet" href="<%=path%>/css/cz.css" />

	<script src="<%=path%>/js/jquery-1.11.0.min.js"></script>
	<script src="<%=path%>/js/plugins/datapicker/bootstrap-datepicker.js"></script>
	<script src="<%=path%>/js/plugins/layer/layer.js"></script>
	<script src="<%=path%>/css/bootstrap/3.3.5/js/bootstrap.min.js"></script>

	<script type="text/javascript" src="<%=path%>/js/slider.js"></script>
	<script type="text/javascript" src="<%=path%>/js/cropper.min.js"></script>
	<script type="text/javascript" src="<%=path%>/js/common.js"></script>	
</head>
<body class="gray-bg">
<jsp:include page="/views/commons/header.jsp"></jsp:include>
<div class="container page-single">
	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">平台交易数据编辑</h3>
			</div>
			<div class="panel-body event-create">
				<form class="form-horizontal" id="platform_trade_form" action="javascript:insertPlatformTradeData()">
					<input type="hidden" name="platformTradeId" value="${platformTradeVO.platformTradeId}"/>
					<input type="hidden" name="platformId" value="${platformTradeVO.platformId}"/>
					<input type="hidden" name="auditStatus" value="${platformTradeVO.auditStatus}"/>
					<div class="form-group">
						<label class="col-sm-1 control-label">平台名</label>
						<c:choose>
							<c:when test="${!empty dataPlatformVO.platformId}">
								<div class="col-sm-10">${dataPlatformVO.platformName}</div>
							</c:when>
							<c:otherwise>
								<div class="col-sm-10">
									<input type="text" class="form-control" placeholder="平台名" name="platformName" 
									value="${dataPlatformVO.platformName}">
								</div>
							</c:otherwise>
						</c:choose>
						
					</div>
					
					<div class="form-group">
						<label class="col-sm-1 control-label">项目名<em>*</em></label>
						<div class="col-sm-10">
							<input type="text" class="form-control" placeholder="项目名" name="projectName" 
							value="${platformTradeVO.projectName}">
						</div>
					</div>
					
					<div class="form-group">
						<label class="col-sm-1 control-label">募资金额(元)<em>*</em></label>
						<div class="col-sm-10">
							<input type="text" class="form-control" placeholder="募资金额(元)" name="tradeAmount"
							value="${platformTradeVO.tradeAmount}">
						</div>
					</div>
					
					<div class="form-group">
						<label  class="col-sm-1 control-label">
							募集开始时间
						</label>
						<div class="col-sm-5" id="trade_start_time">
							<div id="datepicker" class="input-daterange input-group">
								<input type="text"  name="tradeStartTime"  value="<fmt:formatDate value='${platformTradeVO.tradeStartTime}' pattern='yyyy-MM-dd'/>" class="input-sm form-control">
							</div>
						</div>
						<label  class="col-sm-1 control-label">
							募集结束时间
						</label>
						<div class="col-sm-5" id="trade_end_time">
							<div id="datepicker" class="input-daterange input-group">
								<input type="text"  name="tradeEndTime"  value="<fmt:formatDate value='${platformTradeVO.tradeEndTime}' pattern='yyyy-MM-dd'/>" class="input-sm form-control">
							</div>
						</div>
					</div>
					
					<div class="form-group">
						<div class="col-sm-9 col-sm-offset-2">
							<button  class="btn btn-primary" id="platform_trade_confirm_btn" >提交</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>

<jsp:include page="/views/commons/footer.jsp"></jsp:include>

<script type="text/javascript">

	$(function() {
		$("#trade_start_time .input-daterange").datepicker({
			keyboardNavigation: !1,
			forceParse: !1,
			autoclose: !0
		});
		
		$("#trade_end_time .input-daterange").datepicker({
			keyboardNavigation: !1,
			forceParse: !1,
			autoclose: !0
		})
	})
	
	function insertPlatformTradeData(){
		$("#platform_trade_confirm_btn").addClass("disabled").attr("disabled","disabled").val("提交中");
		$.ajax({
			url : path + "/account/platformTrade/update",
			type : "post",
			dataType : "json",
			data : $("#platform_trade_form").serialize(),
			success : function(data)
			{
				if(data.result){
					layer.msg("发布成功",{icon: 1});
					window.opener.queryMyPlatformTradeList(1);
					window.close();
				}else{
					layer.msg(data.message,{icon: 2});;
					$("#platform_trade_confirm_btn").removeClass("disabled").removeAttr("disabled").val("提交");
				}
			},error:function(){
				layer.msg("服务器网络繁忙",{icon: 2});
				$("#platform_trade_confirm_btn").removeClass("disabled").removeAttr("disabled").val("提交");
			}
		});
	}
</script>
</body>
</html>